Interleaved media describes media data of multiple channels. Examples of media data are video, audio, system and auxiliary data. Other types of media also may be used. The media data in each channel is divided into time based segments. That is, a segment contains samples of data that occur for a duration of time, typically the duration of one sample of the media data with the lowest sampling rate among the multiple channels. For example, a segment of video data may be one frame or one field. A segment of audio data may contain a number of audio samples that correspond to one frame or one field of video data. An element of an interleaved data stream includes a segment of one of the channels of media data, optionally encoded in a format such as KLV. An interleaved data stream is created by multiplexing together elements of the multiple channels of media data into a sequence of groupings of elements from one time segment. An example of interleaved media data is SDTI-CP (Serial Digital Transport Interfacexe2x80x94Content Packages) containing system data, MPEG video data, uncompressed audio data, and auxiliary data, as defined in SMPTE 326M, 331M and RP204. In SDTI-CP, groupings of elements are referred to as content packages, but the invention is not limited to interleaved formats defined as having xe2x80x9ccontent packages.xe2x80x9d The invention is applicable to all interleaved media data in which several elements of media data are multiplexed together in time-based groupings.
Elements within a grouping may contain different numbers of bytes. Each element of a grouping may contain a constant number of bytes from grouping to grouping. Such elements are called constant elements. Interleaved data streams with such elements are called constant bytes-per-element (CBE) streams. One or more elements of a grouping also may have a number of bytes that varies from grouping to grouping. Such elements are called variable elements. If an interleaved data stream has one or more elements that is a variable element, such an interleaved data stream is called a variable bytes-per-element (VBE) stream. For VBE streams, a stream index is used to locate each element in the multiplexed stream. The purpose of an index is to locate an element based on a temporal reference, such as a field or frame count or a timecode, to the grouping including the element.
For MPEG video, the compressed video pictures in the compressed bitstream may be reordered from their temporal order according to the MPEG specification. An index that takes this reordering into account is described in PCT Publication WO98/46023, which corresponds to U.S. Pat. No. 6,167,083, and in U.S. patent application Ser. No. 09/544,869, now U.S. Pat. No. 6,337,880, entitled xe2x80x9cIndexing for Motion Video that is Compressed Using Interframe and Intraframe Techniques,xe2x80x9d by Katherine Comog, James Hamilton and Oliver Morgan, filed on Apr. 7, 2000, all of which are hereby incorporated by reference.
By providing an index that stores information about how to access each grouping of elements in an interleaved data stream and each element within each grouping, random access to each element in the interleaved data stream can be achieved. The index may store a temporal offset for each grouping for interleaved data streams in which the order of data samples in the interleaved data stream is different from the order in which those data samples are used to present the data stream. The information that allows each element in a grouping to be accessed may include information defining the length of each element, or information describing the relative position of each element in a grouping, such as a map table. Such a map table may have an entry for each data type, wherein each entry includes an indication of information used to access a sample of the data type.
Accordingly, in one aspect, an index is provided for an interleaved data stream in which elements including samples of at least one data type have an order in the interleaved data stream different from an order in which the samples are presented. Elements including samples of data of each type in a time based segment are combined into groupings. The index includes, for each grouping, an entry that includes a temporal offset to another grouping. The temporal offset of a first grouping indicates an offset in the interleaved data stream between the first grouping and a second grouping containing data for a presentation time corresponding to the position of the first grouping in the interleaved data stream. The entry also includes at least one offset in the interleaved data stream of the grouping. Other information also is stored to enable access to data of a sample of each type in the grouping. In one embodiment, the other information may include a length value stored with the data of each sample indicative of the length of the data for the sample in the interleaved data stream. In another embodiment, the other information may include a map table having an entry for each data type, wherein each entry includes an indication of information used to access a sample of the data type.
Accordingly, in one aspect, an index is provided for an interleaved data stream in which elements include samples of at least one data type. Elements including samples of data of each type in a time-based segment are combined into groupings. The index includes, for each grouping, an entry comprising at least one offset in the interleaved data stream of the grouping. A map table has an entry for each data type, wherein each entry includes an indication of information used to access a sample of the data type.
In various embodiments, the index may include a disk offset for each data type in a grouping, wherein the information in each entry in the map table includes an indication of the location in the entry in the index for the disk offset for the data type. The disk offset for each data type that is not a first data type in a grouping may be stored as a difference between the disk offset for the data type and the disk offset for the first data type.
In another embodiment, the information in an entry of the map table that is used to access a sample of the data type may include an offset from the beginning of a grouping to the beginning of data defining the sample of the data type in the grouping.
In another embodiment, the index may include a disk offset for two or more data types in a grouping. The information in an entry for a data type in the map table may include an indication of the location in the entry in the index for a disk offset for one of the two or more data types and an offset from the disk offset to the beginning of data defining the sample of the data type. The disk offset for each data type that is not a first data type in a grouping may be stored as a difference between the disk offset for the data type and the disk offset for the first data type.
Various other aspects of the invention include the processes and apparatuses for generating and accessing such indexes, and using such indexes to access an interleaved data stream.